from fastapi import APIRouter

from app.api.deps import DbDependency
from app.crud import category_service
from app.utils.response import success_response

router = APIRouter()


@router.get("/list", summary="分类列表")
async def category_list(
        db: DbDependency
):
    category_vo_list = category_service.category_list(db)
    return success_response(data=category_vo_list)
